﻿using System;
using DNT.RavenQA.Core.Models;
using Rhino.Mocks;

namespace DNT.RavenQA.Core.Tests
{
    public class TestBase
    {
        static TestBase()
        {
            FakeUser = MockRepository.GenerateStub<User>();
            FakeUser.Stub(i => i.Id).Return("users/1");
        }

        protected static readonly DateTime DummyDate = new DateTime(2000, 12, 2, 5, 4, 3);
        protected static readonly User FakeUser;
        protected static readonly Func<Question> FakeQuestion = () =>
                                                                    {
                                                                        var questionInput = MockRepository.GenerateStub<IQuestionInput>();
                                                                        questionInput.Stub(i => i.Author).Return(FakeUser);
                                                                        return Question.New(questionInput, () => DummyDate);
                                                                    };
    }
}